<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>


<script>

    var canvas = d3.select("body")
                  .append("svg")
                  .attr("width",500)
                  .attr("height",500);

    var data2 = [
            {x : 10 , y : 20},
            {x : 10 , y : 260},
            {x : 250 , y : 260}
    ];

    var group = canvas.append("g")
                     .attr("transform", "translate(100,200)");

    var line = d3.svg.line()
                   .x(function(d) { return d.x;})
                   .y(function(d) { return d.y;});

    group.selectAll("path")
              .data([data2])
              .enter()
               .append("path")
               .attr("d",line)
               .attr("fill","none")
               .attr("stroke" , "#000")
               .attr("stroke-width", 10 );



</script>

</body>
</html>